﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KardexSist.UserControls.Common
{
    public class Utils
    {
        internal static void ExportGridView(DevExpress.XtraGrid.Views.Grid.GridView grc)
        {
            SaveFileDialog saveDialog = new SaveFileDialog();
            saveDialog.DefaultExt = "*.xlsx";
            saveDialog.Filter = "EXCEL Files|*.xlsx";
            if (saveDialog.ShowDialog() == DialogResult.OK && saveDialog.FileName.Length > 0)
            {
                grc.ExportToXlsx(saveDialog.FileName);
            }
        }
    }
}
